package cn.db101.jcc.entity.table;

import com.mybatisflex.core.query.QueryColumn;
import com.mybatisflex.core.table.TableDef;

// Auto generate by mybatis-flex, do not modify it.
public class FavoritesTableDef extends TableDef {

    /**
     * 收藏ID
     */
    public final QueryColumn ID = new QueryColumn(this, "id");

    /**
     * 用户ID，关联用户表的ID
     */
    public final QueryColumn USER_ID = new QueryColumn(this, "user_id");

    /**
     * 阵容ID，关联阵容表的ID
     */
    public final QueryColumn LINEUP_ID = new QueryColumn(this, "lineup_id");

    /**
     * 创建时间
     */
    public final QueryColumn CREATED_AT = new QueryColumn(this, "created_at");

    /**
     * 更新时间
     */
    public final QueryColumn UPDATED_AT = new QueryColumn(this, "updated_at");

    /**
     * 所有字段。
     */
    public final QueryColumn ALL_COLUMNS = new QueryColumn(this, "*");

    /**
     * 默认字段，不包含逻辑删除或者 large 等字段。
     */
    public final QueryColumn[] DEFAULT_COLUMNS = new QueryColumn[]{ID, USER_ID, LINEUP_ID, CREATED_AT, UPDATED_AT};

    public FavoritesTableDef() {
        super("", "t_favorites");
    }

    private FavoritesTableDef(String schema, String name, String alisa) {
        super(schema, name, alisa);
    }

    public FavoritesTableDef as(String alias) {
        String key = getNameWithSchema() + "." + alias;
        return getCache(key, k -> new FavoritesTableDef("", "t_favorites", alias));
    }

}
